package olegroshka.src.com.bofa.olegroshka.format;

import java.util.Arrays;


public final class FillingFormatter implements RecordFormatter {
	private final int length;
	private final char filling;

	public FillingFormatter(int length, char filling) {
		this.length = length;
		this.filling = filling;
	}

	public String decorate(Object[] in) {
		String result = "";
		if (length > 0) {
		    char[] chars = new char[length];
		    Arrays.fill(chars, filling);
		    result = new String(chars);
		}		
		return result;
	}
}